# table中维系的是buckets的列表，即bucket的集合

from Bucket import *

class Table:
    buckets = []
    size = 0

    def __init__(self, tableSize):
        for i in range(tableSize):
            bucket = Bucket()
            self.buckets.append(bucket)

    def addFeature(self, feature, bucketID, nameID):
        self.buckets[bucketID].addFeature(feature, nameID)

    def size(self):
        return self.size
